// -- Wrap this code so it is available if using a proxy call
function oncallback() {

    // Make up the namespaces to mimic Gears and a place for Jaxer holders
    google = {}; google.gears = {}; google.gears.factory = {}; google.gears.jaxer = {};

    // Create sets up a database instance to be used
    google.gears.factory.create = function(className, version) {
      if (className.indexOf('database') < 0) {
        throw new Error('I can only do Database work right now');
      }
      return new google.gears.jaxer.Db();
    }
    
// -- The Database Wrapper
    google.gears.jaxer.Db = function() {
      this.db = null;
    }

    google.gears.jaxer.Db.prototype.open = function(name) {
      this.db = new Jaxer.DB.SQLite.Connection({ 
        PATH: 'resource:///../data/' + name + '.sqlite', 
        CLOSE_AFTER_EXECUTE: 'open' 
      });  
    }

    google.gears.jaxer.Db.prototype.execute = function(sqlStatement, argArray) {
      var rs = (argArray) ? this.db.execute(sqlStatement, argArray) : this.db.execute(sqlStatement);
      return rs;
    }

}
